<html>
<head>
<title>
<? $pageTitle ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../../wbsadmin/html/classic/wbsadmin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../../common/html/classic/styles/wbscommon.js"></script>
<script type="text/javascript">
<!--
function focusControl(objName) {

	<? if $invalidField ?>
		<? "objName = '"|cat:$invalidField|cat:"'" ?>;
	<? /if ?>

	if ( objName == "hostData[DB_CREATE_OPTIONS][CREATE_OPTION]" )
		return;

	var obj = MM_findObj(objName);
	if (obj)
		obj.focus( );
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../../../wbsadmin/html/classic/images/bg.gif" onLoad="focusControl(<? if $action == "new" ?>'hostData[DB_CREATE_OPTIONS][DATABASE]'<?else?>'hostData[DBSETTINGS][EXPIRE_DATE]'<?/if?>)">
<table width="100%" height="114" border="0" cellspacing="0" cellpadding="0" style="background-image: url(../../../wbsadmin/html/classic/images/gr.gif); background-repeat: repeat-x;" >
<tr><td valign=top><img src=../../../wbsadmin/html/classic/images/empty.gif width=20><img src=../../../wbsadmin/html/classic/images/logo.gif></td>
		<td align=right valign=bottom><a href=../../help/eng/webasystadminguide.htm target=_blank>WebAsyst Administrator Guide</a>&nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp;</td></tr>
</table>
<table width="98%" height="85%" border="0" cellspacing="0" cellpadding="0" bgcolor=white align=center>
<tr height=1>
<td width=4 background="../../../wbsadmin/html/classic/images/bg.gif"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
<td valign=top width=5 align=left><img src=../../../wbsadmin/html/classic/images/ug-l.gif border=0></td>
<td width=100%><img src=../../../wbsadmin/html/classic/images/empty.gif height=5></td>
<td valign=top width=6><img src=../../../wbsadmin/html/classic/images/ug-r.gif></td>
<td width=4 background="../../../wbsadmin/html/classic/images/bg.gif"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
</tr>
<tr><td valign=top style="background-image: url(../../../wbsadmin/html/classic/images/sh-l.gif); background-repeat: repeat-y;"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td><td valign=top><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
<td width=100% valign=top>
<h1><? $pageTitle ?></h1>
<br>
<table border=0 width=95% align=center>
<tr><td>
<!-- here -->

<? strip ?>
<form action="<? $formLink ?>" method="post" enctype="multipart/form-data" name="cform">
	<? assign var="invalidFieldMarkup" value="<span style='color: #FF0000'>" ?>
	<table border="0">
		<tr>
			<td width="20">&nbsp;</td>
			<td>
			<table border="0" cellpadding="0" cellspacing="0">
		<tr>
		<td>
				<? if $errorStr ?>
				<table cellspacing="0" cellpadding="0" border="0">
					<tr>
						<td width="1">&nbsp;</td>
						<td>
							<? $invalidFieldMarkup ?>
							<? $errorStr|nl2br ?>
						</td>
					</tr>
					<tr>
						<td colspan=2>&nbsp;</td>
					</tr>
				</table>
				<? /if ?>

				<? if !$fatalError ?>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="pageHeader">
							<? $DB_NAME ?>
						</td>
					</tr>
					<tr>
						<td>
							<br>
							Actual balance: <? $balance.SMS_BALANCE ?>
							<br>
							Available balance: <? $balance.SMS_AVAILABLE ?><br><br>
						</td>
					</tr>
				</table>
				<? /if ?>

				<table width="500" border="0" cellpadding="0" cellspacing="2">
								<tr>
									<td><input type=radio name="quoteData[ACTION]" value="ADD" checked></td>
									<td>Add to existing balance</td>
								</tr>
								<tr>
									<td><input type=radio name="quoteData[ACTION]" value="SET"></td>
									<td>Set new balance</td>
								</tr>
								<tr>
									<td colspan=2>&nbsp;</td>
								</tr>
								<tr>
									<td></td>
									<td>Balance:&nbsp; <input name="quoteData[VALUE]" type="text" class="control" value="<? $hostData.VALUE ?>" style="width: 150px"></td>
								</tr>
				</table>
				<br><br>
				<input type=hidden name=DB_KEY value="<? $DB_KEY ?>">
				<input type=hidden name=prvars value="<? $prvars ?>">
				<input type="submit" name="savebtn" value="Save">&nbsp;&nbsp;<input type="submit" name="cancelbtn" value="Cancel">



		</p>
		</td>
		<? if $quoteHist ?>
			<td valign="top" style="padding-left: 10px">&nbsp;</td>
			<td valign="top" style="border-left: 1px solid #CCCCCC; padding-left: 10px;">
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
					<td class="pageHeader">Balance Change History</td>
					</tr>
				</table>
				<table cellpadding="0" cellspacing="0" border="0">
					<? foreach from=$quoteHist item=logRecord ?>
						<tr style="padding-bottom: 5px">
							<td class="accountHistoryCell"><? if $logRecord.ROW_URL ?><a href="<? $logRecord.ROW_URL ?>"><? /if ?><? $logRecord.SMSG_QTY ?></a></td>
							<td class="accountHistoryCell"><? if $logRecord.ROW_URL ?><a href="<? $logRecord.ROW_URL ?>"><? /if ?><? if $logRecord.SMSG_SOURCE != "ONCREATE" ?><? $logRecord.SMSG_QS ?><? /if ?></a></td>
							<td class="accountHistoryCell"><? if $logRecord.ROW_URL ?><a href="<? $logRecord.ROW_URL ?>"><? /if ?><? if $logRecord.SMSG_SOURCE == "ONCREATE" ?><b>Initial Balance</b><? else ?> <? $logRecord.SMSG_DATETIME ?><? /if ?></a></td>
						</tr>
					<? /foreach ?>
				</table>
			</td>
		<? /if ?>
		</tr>
		</table>
			</td>
		</tr>
	</table>
	<input name="hostData[DBSETTINGS][IP_ADDRESS]" type="hidden" value="">
	</form>
<? /strip ?>

<BR><BR>
</td></tr>
</table>
</td>
<td valign=top><img src=../../../wbsadmin/html/classic/images/empty.gif></td>
<td valign=top style="background-image: url(../../../wbsadmin/html/classic/images/sh-r.gif); background-repeat: repeat-y;"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
</tr>
<tr height=50>
<td valign=top style="background-image: url(../../../wbsadmin/html/classic/images/sh-l.gif); background-repeat: repeat-y;"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
<td colspan=3 bgcolor=#8FBFF3 valign=middle align=center>Copyright &copy; WebAsyst LLC</td>
<td valign=top style="background-image: url(../../../wbsadmin/html/classic/images/sh-r.gif); background-repeat: repeat-y;"><img src=../../../wbsadmin/html/classic/images/empty.gif width=4></td>
</tr>
</table>
</body>
</html>
